#ifndef _LCD_QC1602A_H_
#define _LCD_QC1602A_H_

#include <arduino/Arduino.h>

#include <lcd/lcd.h>


namespace lcd
{

class qc1602a
    : public abstract_lcd
{
public:

  qc1602a(
      int rs /*< RS pin */,
      int rw /*< RW pin */,
      int e  /*< E  pin */,
      int a  /*< A  pin */,
      int d4 /*< D4 pin */,
      int d5 /*< D5 pin */,
      int d6 /*< D6 pin */,
      int d7 /*< D7 pin */);

  ~qc1602a(void);

  void set_backlight(bool value);

  int get_nb_lines(void) const
  { return 2; }

  int get_nb_columns(void) const
  { return 16; }

  void print(int lin, int col, char const* val);
  void print(int lin, int col, int val);
  void print(int lin, int col, unsigned val);
  void print(int lin, int col, int long val);
  void print(int lin, int col, unsigned long val);
  void print(int lin, int col, float val);
  void print(int lin, int col, double val);

private:

  mutable void* _impl;
  int _backlight;
};

} // lcd


#endif // _LCD_QC1602A_H_
